
import requests
from time import sleep

url1 = 'https://xyzb.yuanfudao.com/orion-bee-task/api/task-types/95075010649261056' #小学题目
url2 = 'https://xyzb.yuanfudao.com/orion-bee-task/api/task-types/95075010649261057' #中学题目
useragent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
#弟
# cookie = 'YFD_U=1706590797041-23676; userid=620896395; __sub_user_infos__=/24T7Ovgtuud9LSYuz4IEwngPCK5Gs+yjxozKSJiROCdQUGy7YNU1VV3yYev+mtchedz1rcIadnIwh5SwOn2mg==; g_loc=vPeteFfrRL2jJ0VNIL3TWQ==; sid=4650329592558179030; persistent=Y4FdhBRGWtKrpywC3QPzv2rCgL2uRtd1VNqjhYQ9I+uvTxBfAhnOIOjAKB+XlMKTYTpZqR5idqT2S2vLgOhxkg==; sess=xU1Jg8Af/BkWz39pCNC+8ClA9apGxZ4bE0V1EBcmZoYtkcdu8v1BrEEXR1rpR35axRiCOIdxw9NBR4mOuM1BfM6KYqTUuHw3s9wBqoceFCQ=; g_sess=xU1Jg8Af/BkWz39pCNC+8ClA9apGxZ4bE0V1EBcmZoYtkcdu8v1BrEEXR1rpR35axRiCOIdxw9NBR4mOuM1BfMU1cAaYuveZSn7vZK7BpfPnm+hezyu7iS8Wxj89oZD6'
#我
cookie1 = 'persistent=nA9WH5lzVuEstNMi2vc2+ngj3kPRotWNyKByuzYT4JITndGj2eQtNLpr43kbWCo3ppp64s+Y4Y7XVw6YFaV+hA==; YFD_U=1709271756950-11526; userid=110631796; __sub_user_infos__=/24T7Ovgtuud9LSYuz4IEzJ9pHJcVzZdBjQwzpvOyKYwE/Bsk2664agm6Bg9Gz+vWbCTWChnPsWcM/fww1IaIQ==; g_loc=vPeteFfrRL2jJ0VNIL3TWQ==; sid=3982074396182235860; sess=l8F7Q3gxszWPW0Vbzuh0FF5i3YptjH3VPjJA2Rh4u3X2vcJU99yIasAPaItSCl8Acswa2XLfNXdQTEURiuwa+5EZMao/s0UZEq+Nn/Kvfzo=; g_sess=l8F7Q3gxszWPW0Vbzuh0FF5i3YptjH3VPjJA2Rh4u3X2vcJU99yIasAPaItSCl8Acswa2XLfNXdQTEURiuwa+3XNa2KgrdeszRIKOfmvFh55gJIvbV1W1V7FC+c9tPje'

head ={'User-Agent':'','Cookie':cookie1}
code = 0      
while code != 1007:
    res = requests.get(url=url1,headers=head)
    # print(res.json())
    # print(type(res.json())) 
    code = res.json()['result']['code']
    print(code)
    sleep(10)
print('抢到啦！！！')

from threading import Thread